import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import java.net.UnknownHostException;

public class FireFoxDriver {

    public static WebDriver driver;


    public static WebDriver createFireFoxDriver(){

        driver = new FirefoxDriver();

        //Automatically will get the computers IP address and load the local tacks application

        try {
            driver.get("http://" + java.net.InetAddress.getLocalHost().getHostAddress() + "/tracks/login");
        } catch (UnknownHostException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }


        return driver;
    }
}